package com.example.servicenacosconfig.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springcloud-alibaba-project
 * @author: daPangDong
 * @create: 2022-04-08 18:05
 */
@RestController
@RequestMapping("/Info")
//@RefreshScope
public class InfoController {
    @Value("${server.port:}")
    private String name;

    @GetMapping("/baseInfo")
    public String getInfo(){
        return "nacos使用配置中心获取的信息："+name;
    }
}